package io.gitee.mojingjiao.day06;

import javafx.scene.effect.SepiaTone;
import org.junit.Test;

import java.util.*;

public class DemoSearch {
    @Test
public void test(){
        String s= "AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT";
        Map<String,Integer>map=countEach(s);

    }
    public Map<String, Integer> countEach( String s){

        Map<String, Integer> map = new HashMap<>();
        Set<String>set1=new HashSet<>();
        Set<String>set2=new HashSet<>();
       for(int i=0;i<23;i++){
           String part = s.substring(i,i+10);
           if(!set1.contains(part)){
               set1.add(part);
           }else{
               set2.add(part);
           }
       }
        System.out.println(set2);
        return map;

    }

}


